home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / PPCToolbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  16.8 KB  |  533 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        PPCToolbox.h
  3.  
  4.      Contains:    Program-Program Communications Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __PPCTOOLBOX__
  21. #define __PPCTOOLBOX__
  22.  
  23.  
  24. #ifndef __APPLETALK__
  25. #include <AppleTalk.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <OSUtils.h>                                        */
  30. /*        #include <MixedMode.h>                                    */
  31. /*        #include <Memory.h>                                        */
  32.  
  33. #ifndef __MEMORY__
  34. #include <Memory.h>
  35. #endif
  36.  
  37. #ifndef __TYPES__
  38. #include <Types.h>
  39. #endif
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44.  
  45. #if PRAGMA_ALIGN_SUPPORTED
  46. #pragma options align=mac68k
  47. #endif
  48.  
  49. #if PRAGMA_IMPORT_SUPPORTED
  50. #pragma import on
  51. #endif
  52.  
  53. typedef unsigned char PPCServiceType;
  54.  
  55.  
  56. enum {
  57.     ppcServiceRealTime            = 1
  58. };
  59.  
  60. typedef short PPCLocationKind;
  61.  
  62.  
  63. enum {
  64.     ppcNoLocation                = 0,                            /* There is no PPCLocName */
  65.     ppcNBPLocation                = 1,                            /* Use AppleTalk NBP      */
  66.     ppcNBPTypeLocation            = 2                                /* Used for specifying a location name type during PPCOpen only */
  67. };
  68.  
  69. typedef short PPCPortKinds;
  70.  
  71.  
  72. enum {
  73.     ppcByCreatorAndType            = 1,                            /* Port type is specified as colloquial Mac creator and type */
  74.     ppcByString                    = 2                                /* Port type is in pascal string format */
  75. };
  76.  
  77. /* Values returned for request field in PPCInform call */
  78. typedef unsigned char PPCSessionOrigin;
  79.  
  80.  
  81. enum {
  82. /* Values returned for requestType field in PPCInform call */
  83.     ppcLocalOrigin                = 1,                            /* session originated from this machine */
  84.     ppcRemoteOrigin                = 2                                /* session originated from remote machine */
  85. };
  86.  
  87. typedef short PPCPortRefNum;
  88.  
  89. typedef long PPCSessRefNum;
  90.  
  91. struct PPCPortRec {
  92.     ScriptCode                        nameScript;                    /* script of name */
  93.     Str32                            name;                        /* name of port as seen in browser */
  94.     PPCPortKinds                    portKindSelector;            /* which variant */
  95.     union {
  96.         Str32                            portTypeStr;            /* pascal type string */
  97.         struct {
  98.             OSType                            portCreator;
  99.             OSType                            portType;
  100.         }                                port;
  101.     } u;
  102. };
  103.  
  104. typedef struct PPCPortRec PPCPortRec, *PPCPortPtr;
  105.  
  106. struct LocationNameRec {
  107.     PPCLocationKind                    locationKindSelector;        /* which variant */
  108.     union {
  109.         EntityName                        nbpEntity;                /* NBP name entity */
  110.         Str32                            nbpType;                /* just the NBP type string, for PPCOpen */
  111.     } u;
  112. };
  113.  
  114. typedef struct LocationNameRec LocationNameRec, *LocationNamePtr;
  115.  
  116. struct PortInfoRec {
  117.     unsigned char                    filler1;
  118.     Boolean                            authRequired;
  119.     PPCPortRec                        name;
  120. };
  121. typedef struct PortInfoRec PortInfoRec, *PortInfoPtr;
  122.  
  123. typedef PortInfoRec *PortInfoArrayPtr;
  124.  
  125. typedef union PPCParamBlockRec PPCParamBlockRec, *PPCParamBlockPtr;
  126.  
  127. typedef pascal void (*PPCCompProcPtr)(PPCParamBlockPtr pb);
  128.  
  129. #if GENERATINGCFM
  130. typedef UniversalProcPtr PPCCompUPP;
  131. #else
  132. typedef PPCCompProcPtr PPCCompUPP;
  133. #endif
  134.  
  135. #define PPCHeader                 \
  136.     Ptr qLink;                     \
  137.     unsigned short csCode;         \
  138.     unsigned short intUse;         \
  139.     Ptr intUsePtr;                 \
  140.                                 \
  141.     PPCCompUPP ioCompletion;        \
  142.                                 \
  143.     OSErr ioResult;             \
  144.     unsigned long    Reserved[5];
  145. struct PPCOpenPBRec {
  146.     Ptr                                qLink;
  147.     unsigned short                    csCode;
  148.     unsigned short                    intUse;
  149.     Ptr                                intUsePtr;
  150.     PPCCompUPP                        ioCompletion;
  151.     OSErr                            ioResult;
  152.     unsigned long                    Reserved[5];
  153.     PPCPortRefNum                    portRefNum;                    /* 38 <--   Port Reference */
  154.     long                            filler1;
  155.     PPCServiceType                    serviceType;                /* 44 -->    Bit field describing the requested port service */
  156.     UInt8                            resFlag;                    /* Must be set to 0 */
  157.     PPCPortPtr                        portName;                    /* 46 -->   PortName for PPC */
  158.     LocationNamePtr                    locationName;                /* 50 -->   If NBP Registration is required */
  159.     Boolean                            networkVisible;                /* 54 -->   make this network visible on network */
  160.     Boolean                            nbpRegistered;                /* 55 <--   The given location name was registered on the network */
  161. };
  162. typedef struct PPCOpenPBRec PPCOpenPBRec, *PPCOpenPBPtr;
  163.  
  164. struct PPCInformPBRec {
  165.     Ptr                                qLink;
  166.     unsigned short                    csCode;
  167.     unsigned short                    intUse;
  168.     Ptr                                intUsePtr;
  169.     PPCCompUPP                        ioCompletion;
  170.     OSErr                            ioResult;
  171.     unsigned long                    Reserved[5];
  172.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  173.     PPCSessRefNum                    sessRefNum;                    /* 40 <--   Session Reference */
  174.     PPCServiceType                    serviceType;                /* 44 <--   Status Flags for type of session, local, remote */
  175.     Boolean                            autoAccept;                    /* 45 -->   if true session will be accepted automatically */
  176.     PPCPortPtr                        portName;                    /* 46 -->   Buffer for Source PPCPortRec */
  177.     LocationNamePtr                    locationName;                /* 50 -->   Buffer for Source LocationNameRec */
  178.     StringPtr                        userName;                    /* 54 -->   Buffer for Soure user's name trying to link. */
  179.     unsigned long                    userData;                    /* 58 <--   value included in PPCStart's userData */
  180.     PPCSessionOrigin                requestType;                /* 62 <--   Local or Network */
  181.     SInt8                            filler;
  182. };
  183. typedef struct PPCInformPBRec PPCInformPBRec, *PPCInformPBPtr;
  184.  
  185. struct PPCStartPBRec {
  186.     Ptr                                qLink;
  187.     unsigned short                    csCode;
  188.     unsigned short                    intUse;
  189.     Ptr                                intUsePtr;
  190.     PPCCompUPP                        ioCompletion;
  191.     OSErr                            ioResult;
  192.     unsigned long                    Reserved[5];
  193.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  194.     PPCSessRefNum                    sessRefNum;                    /* 40 <--   Session Reference */
  195.     PPCServiceType                    serviceType;                /* 44 <--   Actual service method (realTime) */
  196.     UInt8                            resFlag;                    /* 45 -->   Must be set to 0  */
  197.     PPCPortPtr                        portName;                    /* 46 -->   Destination portName */
  198.     LocationNamePtr                    locationName;                /* 50 -->   NBP or NAS style service location name */
  199.     unsigned long                    rejectInfo;                    /* 54 <--   reason for rejecting the session request */
  200.     unsigned long                    userData;                    /* 58 -->   Copied to destination PPCInform parameter block */
  201.     unsigned long                    userRefNum;                    /* 62 -->   userRefNum (obtained during login process)  */
  202. };
  203. typedef struct PPCStartPBRec PPCStartPBRec, *PPCStartPBPtr;
  204.  
  205. struct PPCAcceptPBRec {
  206.     Ptr                                qLink;
  207.     unsigned short                    csCode;
  208.     unsigned short                    intUse;
  209.     Ptr                                intUsePtr;
  210.     PPCCompUPP                        ioCompletion;
  211.     OSErr                            ioResult;
  212.     unsigned long                    Reserved[5];
  213.     short                            filler1;
  214.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  215. };
  216. typedef struct PPCAcceptPBRec PPCAcceptPBRec, *PPCAcceptPBPtr;
  217.  
  218. struct PPCRejectPBRec {
  219.     Ptr                                qLink;
  220.     unsigned short                    csCode;
  221.     unsigned short                    intUse;
  222.     Ptr                                intUsePtr;
  223.     PPCCompUPP                        ioCompletion;
  224.     OSErr                            ioResult;
  225.     unsigned long                    Reserved[5];
  226.     short                            filler1;
  227.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  228.     short                            filler2;
  229.     long                            filler3;
  230.     long                            filler4;
  231.     unsigned long                    rejectInfo;                    /* 54 -->   reason for rejecting the session request  */
  232. };
  233. typedef struct PPCRejectPBRec PPCRejectPBRec, *PPCRejectPBPtr;
  234.  
  235. struct PPCWritePBRec {
  236.     Ptr                                qLink;
  237.     unsigned short                    csCode;
  238.     unsigned short                    intUse;
  239.     Ptr                                intUsePtr;
  240.     PPCCompUPP                        ioCompletion;
  241.     OSErr                            ioResult;
  242.     unsigned long                    Reserved[5];
  243.     short                            filler1;
  244.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  245.     Size                            bufferLength;                /* 44 -->   Length of the message buffer */
  246.     Size                            actualLength;                /* 48 <--   Actual Length Written */
  247.     Ptr                                bufferPtr;                    /* 52 -->   Pointer to message buffer */
  248.     Boolean                            more;                        /* 56 -->   if more data in this block will be written */
  249.     unsigned char                    filler2;
  250.     unsigned long                    userData;                    /* 58 -->   Message block userData Uninterpreted by PPC */
  251.     OSType                            blockCreator;                /* 62 -->   Message block creator Uninterpreted by PPC */
  252.     OSType                            blockType;                    /* 66 -->   Message block type Uninterpreted by PPC */
  253. };
  254. typedef struct PPCWritePBRec PPCWritePBRec, *PPCWritePBPtr;
  255.  
  256. struct PPCReadPBRec {
  257.     Ptr                                qLink;
  258.     unsigned short                    csCode;
  259.     unsigned short                    intUse;
  260.     Ptr                                intUsePtr;
  261.     PPCCompUPP                        ioCompletion;
  262.     OSErr                            ioResult;
  263.     unsigned long                    Reserved[5];
  264.     short                            filler1;
  265.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  266.     Size                            bufferLength;                /* 44 -->   Length of the message buffer */
  267.     Size                            actualLength;                /* 48 <--   Actual length read */
  268.     Ptr                                bufferPtr;                    /* 52 -->   Pointer to message buffer */
  269.     Boolean                            more;                        /* 56 <--   if true more data in this block to be read */
  270.     unsigned char                    filler2;
  271.     unsigned long                    userData;                    /* 58 <--   Message block userData Uninterpreted by PPC */
  272.     OSType                            blockCreator;                /* 62 <--   Message block creator Uninterpreted by PPC */
  273.     OSType                            blockType;                    /* 66 <--   Message block type Uninterpreted by PPC */
  274. };
  275. typedef struct PPCReadPBRec PPCReadPBRec, *PPCReadPBPtr;
  276.  
  277. struct PPCEndPBRec {
  278.     Ptr                                qLink;
  279.     unsigned short                    csCode;
  280.     unsigned short                    intUse;
  281.     Ptr                                intUsePtr;
  282.     PPCCompUPP                        ioCompletion;
  283.     OSErr                            ioResult;
  284.     unsigned long                    Reserved[5];
  285.     short                            filler1;
  286.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  287. };
  288. typedef struct PPCEndPBRec PPCEndPBRec, *PPCEndPBPtr;
  289.  
  290. struct PPCClosePBRec {
  291.     Ptr                                qLink;
  292.     unsigned short                    csCode;
  293.     unsigned short                    intUse;
  294.     Ptr                                intUsePtr;
  295.     PPCCompUPP                        ioCompletion;
  296.     OSErr                            ioResult;
  297.     unsigned long                    Reserved[5];
  298.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  299. };
  300. typedef struct PPCClosePBRec PPCClosePBRec, *PPCClosePBPtr;
  301.  
  302. struct IPCListPortsPBRec {
  303.     Ptr                                qLink;
  304.     unsigned short                    csCode;
  305.     unsigned short                    intUse;
  306.     Ptr                                intUsePtr;
  307.     PPCCompUPP                        ioCompletion;
  308.     OSErr                            ioResult;
  309.     unsigned long                    Reserved[5];
  310.     short                            filler1;
  311.     unsigned short                    startIndex;                    /* 40 -->   Start Index */
  312.     unsigned short                    requestCount;                /* 42 -->   Number of entries to be returned */
  313.     unsigned short                    actualCount;                /* 44 <--   Actual Number of entries to be returned */
  314.     PPCPortPtr                        portName;                    /* 46 -->   PortName Match */
  315.     LocationNamePtr                    locationName;                /* 50 -->   NBP or NAS type name to locate the Port Location */
  316.     PortInfoArrayPtr                bufferPtr;                    /* 54 -->   Pointer to a buffer requestCount*sizeof(PortInfo) bytes big */
  317. };
  318. typedef struct IPCListPortsPBRec IPCListPortsPBRec, *IPCListPortsPBPtr;
  319.  
  320. union PPCParamBlockRec {
  321.     PPCOpenPBRec                    openParam;
  322.     PPCInformPBRec                    informParam;
  323.     PPCStartPBRec                    startParam;
  324.     PPCAcceptPBRec                    acceptParam;
  325.     PPCRejectPBRec                    rejectParam;
  326.     PPCWritePBRec                    writeParam;
  327.     PPCReadPBRec                    readParam;
  328.     PPCEndPBRec                        endParam;
  329.     PPCClosePBRec                    closeParam;
  330.     IPCListPortsPBRec                listPortsParam;
  331. };
  332.  
  333. #if !GENERATINGCFM
  334. #pragma parameter __D0 PPCInit
  335. #endif
  336. extern pascal OSErr PPCInit(void)
  337.  TWOWORDINLINE(0x7000, 0xA0DD);
  338.  
  339. #if !GENERATINGCFM
  340. #pragma parameter __D0 PPCOpenSync(__A0)
  341. #endif
  342. extern pascal OSErr PPCOpenSync(PPCOpenPBPtr pb)
  343.  TWOWORDINLINE(0x7001, 0xA0DD);
  344.  
  345. #if !GENERATINGCFM
  346. #pragma parameter __D0 PPCOpenAsync(__A0)
  347. #endif
  348. extern pascal OSErr PPCOpenAsync(PPCOpenPBPtr pb)
  349.  TWOWORDINLINE(0x7001, 0xA4DD);
  350.  
  351. #if !GENERATINGCFM
  352. #pragma parameter __D0 PPCInformSync(__A0)
  353. #endif
  354. extern pascal OSErr PPCInformSync(PPCInformPBPtr pb)
  355.  TWOWORDINLINE(0x7003, 0xA0DD);
  356.  
  357. #if !GENERATINGCFM
  358. #pragma parameter __D0 PPCInformAsync(__A0)
  359. #endif
  360. extern pascal OSErr PPCInformAsync(PPCInformPBPtr pb)
  361.  TWOWORDINLINE(0x7003, 0xA4DD);
  362.  
  363. #if !GENERATINGCFM
  364. #pragma parameter __D0 PPCStartSync(__A0)
  365. #endif
  366. extern pascal OSErr PPCStartSync(PPCStartPBPtr pb)
  367.  TWOWORDINLINE(0x7002, 0xA0DD);
  368.  
  369. #if !GENERATINGCFM
  370. #pragma parameter __D0 PPCStartAsync(__A0)
  371. #endif
  372. extern pascal OSErr PPCStartAsync(PPCStartPBPtr pb)
  373.  TWOWORDINLINE(0x7002, 0xA4DD);
  374.  
  375. #if !GENERATINGCFM
  376. #pragma parameter __D0 PPCAcceptSync(__A0)
  377. #endif
  378. extern pascal OSErr PPCAcceptSync(PPCAcceptPBPtr pb)
  379.  TWOWORDINLINE(0x7004, 0xA0DD);
  380.  
  381. #if !GENERATINGCFM
  382. #pragma parameter __D0 PPCAcceptAsync(__A0)
  383. #endif
  384. extern pascal OSErr PPCAcceptAsync(PPCAcceptPBPtr pb)
  385.  TWOWORDINLINE(0x7004, 0xA4DD);
  386.  
  387. #if !GENERATINGCFM
  388. #pragma parameter __D0 PPCRejectSync(__A0)
  389. #endif
  390. extern pascal OSErr PPCRejectSync(PPCRejectPBPtr pb)
  391.  TWOWORDINLINE(0x7005, 0xA0DD);
  392.  
  393. #if !GENERATINGCFM
  394. #pragma parameter __D0 PPCRejectAsync(__A0)
  395. #endif
  396. extern pascal OSErr PPCRejectAsync(PPCRejectPBPtr pb)
  397.  TWOWORDINLINE(0x7005, 0xA4DD);
  398.  
  399. #if !GENERATINGCFM
  400. #pragma parameter __D0 PPCWriteSync(__A0)
  401. #endif
  402. extern pascal OSErr PPCWriteSync(PPCWritePBPtr pb)
  403.  TWOWORDINLINE(0x7006, 0xA0DD);
  404.  
  405. #if !GENERATINGCFM
  406. #pragma parameter __D0 PPCWriteAsync(__A0)
  407. #endif
  408. extern pascal OSErr PPCWriteAsync(PPCWritePBPtr pb)
  409.  TWOWORDINLINE(0x7006, 0xA4DD);
  410.  
  411. #if !GENERATINGCFM
  412. #pragma parameter __D0 PPCReadSync(__A0)
  413. #endif
  414. extern pascal OSErr PPCReadSync(PPCReadPBPtr pb)
  415.  TWOWORDINLINE(0x7007, 0xA0DD);
  416.  
  417. #if !GENERATINGCFM
  418. #pragma parameter __D0 PPCReadAsync(__A0)
  419. #endif
  420. extern pascal OSErr PPCReadAsync(PPCReadPBPtr pb)
  421.  TWOWORDINLINE(0x7007, 0xA4DD);
  422.  
  423. #if !GENERATINGCFM
  424. #pragma parameter __D0 PPCEndSync(__A0)
  425. #endif
  426. extern pascal OSErr PPCEndSync(PPCEndPBPtr pb)
  427.  TWOWORDINLINE(0x7008, 0xA0DD);
  428.  
  429. #if !GENERATINGCFM
  430. #pragma parameter __D0 PPCEndAsync(__A0)
  431. #endif
  432. extern pascal OSErr PPCEndAsync(PPCEndPBPtr pb)
  433.  TWOWORDINLINE(0x7008, 0xA4DD);
  434.  
  435. #if !GENERATINGCFM
  436. #pragma parameter __D0 PPCCloseSync(__A0)
  437. #endif
  438. extern pascal OSErr PPCCloseSync(PPCClosePBPtr pb)
  439.  TWOWORDINLINE(0x7009, 0xA0DD);
  440.  
  441. #if !GENERATINGCFM
  442. #pragma parameter __D0 PPCCloseAsync(__A0)
  443. #endif
  444. extern pascal OSErr PPCCloseAsync(PPCClosePBPtr pb)
  445.  TWOWORDINLINE(0x7009, 0xA4DD);
  446.  
  447. #if !GENERATINGCFM
  448. #pragma parameter __D0 IPCListPortsSync(__A0)
  449. #endif
  450. extern pascal OSErr IPCListPortsSync(IPCListPortsPBPtr pb)
  451.  TWOWORDINLINE(0x700A, 0xA0DD);
  452.  
  453. #if !GENERATINGCFM
  454. #pragma parameter __D0 IPCListPortsAsync(__A0)
  455. #endif
  456. extern pascal OSErr IPCListPortsAsync(IPCListPortsPBPtr pb)
  457.  TWOWORDINLINE(0x700A, 0xA4DD);
  458. extern pascal OSErr DeleteUserIdentity(unsigned long userRef);
  459. extern pascal OSErr GetDefaultUser(unsigned long *userRef, Str32 userName);
  460. extern pascal OSErr StartSecureSession(PPCStartPBPtr pb, Str32 userName, Boolean useDefault, Boolean allowGuest, Boolean *guestSelected, ConstStr255Param prompt);
  461. typedef pascal Boolean (*PPCFilterProcPtr)(LocationNamePtr name, PortInfoPtr port);
  462.  
  463. #if GENERATINGCFM
  464. typedef UniversalProcPtr PPCFilterUPP;
  465. #else
  466. typedef PPCFilterProcPtr PPCFilterUPP;
  467. #endif
  468.  
  469. enum {
  470.     uppPPCCompProcInfo = kPascalStackBased
  471.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(PPCParamBlockPtr))),
  472.     uppPPCFilterProcInfo = kPascalStackBased
  473.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  474.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(LocationNamePtr)))
  475.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(PortInfoPtr)))
  476. };
  477.  
  478. #if GENERATINGCFM
  479. #define NewPPCCompProc(userRoutine)        \
  480.         (PPCCompUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture())
  481. #define NewPPCFilterProc(userRoutine)        \
  482.         (PPCFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture())
  483. #else
  484. #define NewPPCCompProc(userRoutine)        \
  485.         ((PPCCompUPP) (userRoutine))
  486. #define NewPPCFilterProc(userRoutine)        \
  487.         ((PPCFilterUPP) (userRoutine))
  488. #endif
  489.  
  490. #if GENERATINGCFM
  491. #define CallPPCCompProc(userRoutine, pb)        \
  492.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPPCCompProcInfo, (pb))
  493. #define CallPPCFilterProc(userRoutine, name, port)        \
  494.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPPCFilterProcInfo, (name), (port))
  495. #else
  496. #define CallPPCCompProc(userRoutine, pb)        \
  497.         (*(userRoutine))((pb))
  498. #define CallPPCFilterProc(userRoutine, name, port)        \
  499.         (*(userRoutine))((name), (port))
  500. #endif
  501.  
  502. extern pascal OSErr PPCBrowser(ConstStr255Param prompt, ConstStr255Param applListLabel, Boolean defaultSpecified, LocationNameRec *theLocation, PortInfoRec *thePortInfo, PPCFilterUPP portFilter, ConstStr32Param theLocNBPType)
  503.  THREEWORDINLINE(0x303C, 0x0D00, 0xA82B);
  504. #if OLDROUTINENAMES
  505. /*
  506.   The ParamBlock calls with the "Sync" or "Async" suffix are being phased out.
  507. */
  508. #define PPCOpen(pb, async)      ((async) ? PPCOpenAsync(pb)      : PPCOpenSync(pb))
  509. #define PPCInform(pb, async)    ((async) ? PPCInformAsync(pb)    : PPCInformSync(pb))
  510. #define PPCStart(pb, async)     ((async) ? PPCStartAsync(pb)     : PPCStartSync(pb))
  511. #define PPCAccept(pb, async)    ((async) ? PPCAcceptAsync(pb)    : PPCAcceptSync(pb))
  512. #define PPCReject(pb, async)    ((async) ? PPCRejectAsync(pb)    : PPCRejectSync(pb))
  513. #define PPCWrite(pb, async)     ((async) ? PPCWriteAsync(pb)     : PPCWriteSync(pb))
  514. #define PPCRead(pb, async)      ((async) ? PPCReadAsync(pb)      : PPCReadSync(pb))
  515. #define PPCEnd(pb, async)       ((async) ? PPCEndAsync(pb)       : PPCEndSync(pb))
  516. #define PPCClose(pb, async)     ((async) ? PPCCloseAsync(pb)     : PPCCloseSync(pb))
  517. #define IPCListPorts(pb, async) ((async) ? IPCListPortsAsync(pb) : IPCListPortsSync(pb))
  518. #endif
  519.  
  520. #if PRAGMA_IMPORT_SUPPORTED
  521. #pragma import off
  522. #endif
  523.  
  524. #if PRAGMA_ALIGN_SUPPORTED
  525. #pragma options align=reset
  526. #endif
  527.  
  528. #ifdef __cplusplus
  529. }
  530. #endif
  531.  
  532. #endif /* __PPCTOOLBOX__ */
  533.